package com.icepeach.icepeachhomeback.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.icepeach.icepeachhomeback.entity.Relation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 24273
* @description 针对表【relation】的数据库操作Mapper
* @createDate 2023-05-03 21:48:38
* @Entity com.icepeach.icepeachhomeback.entity.Relation
*/
public interface RelationMapper extends BaseMapper<Relation> {

    /**
     *
     * @param businessType
     * @param targetType
     * @param businessId
     * @return
     */
    List<Relation> queryRelationListByBusinessId(@Param("businessType") Integer businessType,@Param("targetType") Integer targetType,@Param("businessId") String businessId);

    /**
     *
     * @param businessType
     * @param targetType
     * @param targetId
     * @return
     */
    List<Relation> queryRelationListByTargetId(@Param("businessType") Integer businessType,@Param("targetType") Integer targetType,@Param("targetId") String targetId);

    /**
     * 批量插入
     * @param relationList
     */
    void batchInsertRelationByBusinessId(@Param("relationList") List<Relation> relationList);


}
